package com.jjh.service;

import com.jjh.consts.Result;
import com.jjh.pojo.Category;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.Map;

public interface CateGoryService {
    Result page(Integer page, Integer size, Map<String, Object> map);

    List<Category> getByCondition(Map<String,Object> map);

    @Transactional
    Result addOne(Category category);

    @Transactional
    Result updateOne(Category category);
    @Transactional
    Result deleteByIds(List<Integer> ids) throws SQLIntegrityConstraintViolationException;

    Result getDishCates();

    Result getTaoCanCates();
}
